import 'package:aichat_flutter_wallet/module/module_dapp/widgets/hover_status.dart';
import 'package:aichat_flutter_wallet/module_common/utils/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class ClaimSuccessfulDialog {
  static showAboutGas(BuildContext context) {
    return showDialog(
        context: context,
        barrierDismissible: false,
        builder: (_) {
          return Dialog(
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(10.0.w),
            ),
            child: IntrinsicHeight(
              child: ClipRRect(
                borderRadius: BorderRadius.circular(10.0.w),
                child: Container(
                    padding: EdgeInsets.symmetric(horizontal: 25.w),
                    decoration: BoxDecoration(
                        borderRadius: BorderRadius.all(
                          Radius.circular(20.w),
                        ),
                        color: AppColors.c_white),
                    child: Column(
                      children: [
                        SizedBox(
                          height: 10.w,
                        ),
                        Image.asset(
                          'assets/images/integral/claim_successful.png',
                          width: 120.w,
                          height: 120.w,
                        ),
                        SizedBox(
                          height: 10.w,
                        ),
                        Text(
                          'Claim Successful!',
                          style: TextStyle(
                              fontSize: 14.sp,
                              height: 20.w / 14.w,
                              color: AppColors.c_333333,
                              fontWeight: FontWeight.w500),
                        ),
                        Text(
                          'Explore more rewards',
                          style: TextStyle(
                              fontSize: 14.sp,
                              height: 20.w / 14.w,
                              color: AppColors.c_333333,
                              fontWeight: FontWeight.w500),
                        ),
                        SizedBox(
                          height: 20.w,
                        ),
                        HoverStatus(
                          onPressed: () {
                            Navigator.pop(context);
                          },
                          defaultColor: AppColors.c_8667FE,
                          hoverColor: AppColors.c_6D4DE7,
                          radius: 10.w,
                          child: Container(
                            width: 260.w,
                            height: 46.w,
                            alignment: Alignment.center,
                            child: Text(
                              'Claim More',
                              style: TextStyle(
                                fontSize: 14.sp,
                                fontWeight: FontWeight.w500,
                                color: AppColors.c_white,
                              ),
                            ),
                          ),
                        ),
                        GestureDetector(
                          onTap: () {
                            Navigator.pop(context);
                          },
                          child: Container(
                            color: Colors.transparent,
                            padding: EdgeInsets.only(top: 15.w, bottom: 20.w),
                            child: Text(
                              'Cancel',
                              style: TextStyle(
                                  fontSize: 12.sp,
                                  height: (20 / 12).w,
                                  fontWeight: FontWeight.w400,
                                  color: AppColors.c_868391),
                            ),
                          ),
                        )
                      ],
                    )),
              ),
            ),
          );
        });
  }
}
